﻿Public Class HexStream
    Inherits System.IO.Stream

    Public Overrides ReadOnly Property CanRead As Boolean
        Get

        End Get
    End Property

    Public Overrides ReadOnly Property CanSeek As Boolean
        Get

        End Get
    End Property

    Public Overrides ReadOnly Property CanWrite As Boolean
        Get
            Return True
        End Get
    End Property

    Public Overrides Sub Flush()

    End Sub

    Public Overrides ReadOnly Property Length As Long
        Get

        End Get
    End Property

    Public Overrides Property Position As Long
        Get

        End Get
        Set(value As Long)

        End Set
    End Property

    Public Overrides Function Read(buffer() As Byte, offset As Integer, count As Integer) As Integer

    End Function

    Public Overrides Function Seek(offset As Long, origin As System.IO.SeekOrigin) As Long

    End Function

    Public Overrides Sub SetLength(value As Long)

    End Sub

    Public Overrides Sub Write(buffer() As Byte, offset As Integer, count As Integer)
        For i = offset To (offset + count)
            Try
                Dim A As String = Convert.ToString(buffer(i), 16)
                If A.Length = 1 Then A = "0" & A
                Console.Write(A)
            Catch ex As Exception

            End Try
        Next
    End Sub
End Class
